﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Insteon.Commands.Insteon
{
    //defunct
    internal class AllLinkCleanupAck : Command
    {
        internal readonly InsteonAddress To;
        internal readonly InsteonAddress From;
        internal readonly byte Command1;
        internal readonly byte Command2;

        public AllLinkCleanupAck(InsteonAddress From, InsteonAddress To, byte Command1, byte Command2)
        {
            Flags Flags = new Flags(Flags.MessageType.AckAllLinkCleanup, false);
            if (To == null || From == null)
            {
                throw new Exception("from, to, or flags cannot be null");
            }
            this.From = From;
            this.To = To;
            this.Command1 = Command1;
            this.Command2 = Command2;
            buffer = new byte[11];
            buffer[0] = 2;
            buffer[1] = (byte)0x50;
            buffer[2] = From.High;
            buffer[3] = From.Mid;
            buffer[4] = From.Low;
            buffer[5] = To.High;
            buffer[6] = To.Mid;
            buffer[7] = To.Low;
            buffer[8] = Flags.BinFlags;
            buffer[9] = Command1;
            buffer[10] = Command2;
        }

        internal override bool IsResponse(Messages.Message Message)
        {
            return false;
        }
    }
}
